package uk.ac.bath.legacy;



public final class Value  {


    public double val;

    public Value(double val) {
        this.val = val;
    //	assert val >= 0.0 && val < 1000000.0 : "val="+val;
    }


    public void readString(String data) {
        val = Double.parseDouble(data);

    }

    public String toString() {
        return String.valueOf(val);
    }

    public Object clone() {
        return new Value(val);
    }

    public void set(Value s) {
        val = s.val;
    //	assert val >= 0.0 && val < 1000000.0  : "val=" + val ;
    }

    public void set(double s) {

        val = s;
    //	assert val >= 0.0 && val < 1000000.0 : "val=" + s ;
    }

//    public boolean isLessThan(Value v) {
//        return val < v.val;
//    }

    //    public Value at(int i) { return this;}
    public double doubleValue() {
        return val;
    }

    static final Value ONE = new Value(1.0);
    static final Value ZERO = new Value(0.0);

}

